package com.shirley.pers.zhufengfmvi.utils;

import java.text.NumberFormat;

/**
 * Description: 数据格式化工具类<br/>
 * <p/>
 * Copyright (c) , 2016, Shirley Xian <br/>
 * This program is protected by copyright laws. <br/>
 * ClassName: DataFormatUtils<br/>
 * Date: 2016/4/9 9:55
 *
 * @author Shirley Xian
 * @version 1.0
 */
public final class DataFormatUtils {
    /**
     * 保留两位小数
     *
     * @param dVale
     * @return
     */
    public static String Decimal2format(Double dVale) {
        NumberFormat numberFormat = NumberFormat.getNumberInstance();
        numberFormat.setMaximumFractionDigits(2);
        return numberFormat.format(dVale);
    }

}
